package com.lile.login.regist;

import java.util.ArrayList;

public class UserDaoImpl implements UserDao {

	private static ArrayList<User> arrayList = new ArrayList<User>();

	@Override
	public void regist(User user) {
		arrayList.add(user);
	}

	@Override
	public boolean isLogin(String username, String password) {
		boolean flag = false;

		for (User user : arrayList) {
			if (user.getUsername().equals(username) && user.getPassword().equals(password)) {
				flag = true;
				break;
			}
		}
		return flag;
	}

}
